<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn"  uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form"uri="http://www.springframework.org/tags/form"%>

<%@page import="biblioteca.persistencia.*"%>
<%@page import="biblioteca.dao.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        
        <link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico"/>
        <link type="text/css" rel="stylesheet" href="/stylesheets/menu.css"/>
        <title>Registro</title>
        
        
        <script language="javascript" type="text/javascript">
            $(document).ready(
            function(){
             <%if(request.getParameter("error")!=null){%>
             alert("Datos no validos. Vuelvelo a intentar");
            <%}%>
            }
);
        </script>
        
    </head>
 
    <body>
        <h1>Registrar Usuario</h1>
        
 <div id="stylized" class="myform">

<form action="/registrar"  method="post" id="form" name="form">
    

	<label>Nombre de Usuario: 
            <span class="small">Introduce un nombre de usuario</span>
        </label>
        <input class="texto" id="name" name="username" type="text" size="20" required="required"/>
       
	<label>Password: 
            <span class="small">Introduce una contraseña</span>
        </label>
        <input class="texto" id="name" name="password" type="password" required="required"/>
       
	<label>Email: 
            <span class="small">Introduce un email válido</span>
        </label>
        <input class="texto" id="name" name="email" type="text" required="required" />
        
	<label>Nombre: 
            <span class="small">Introduce tu nombre</span>
        </label>
        <input class="texto" id="name" name="nombre" type="text" required="required"/>
        
        <label>Apellidos: 
            <span class="small">Introduce tus apellidos</span>
        </label>
        <input class="texto" id="name" name="apellidos" type="text" required="required"/>
        
        
	<input class="botonenviar" id="submit" type="submit" value=" Registrar"/>
        <input type="reset" value="Borrar">
	<input type="button" value="Volver" onclick="history.back()">
        <div class="spacer"></div>
</form>

 </div>
        

        
    </body>
</html>
